package cn.huiyunche.base.service.mappers.ext;

import cn.huiyunche.base.service.model.CBill;
import cn.huiyunche.base.service.vo.CBillAdminVo;
import cn.huiyunche.base.service.vo.KyleCompanyBill;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface CBillViewMapper {

    int deleteByTime(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") String userId, @Param(value = "userType") int userType);

    void genMonthBill(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId, @Param(value = "userType") int userType
            , @Param(value = "payTypes") List<Integer> payTypeList, @Param(value = "userIdSet") Set<Long> userIdSet, @Param(value = "status") int status);

    List<CBill> selectByTime(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId, @Param(value = "userType") int userType, @Param(value = "userIdSet") Set<Long> userIdSet);

    int deleteByIds(@Param(value = "ids") List<Long> ids);

    List<CBill> selectByTimeNoUser(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId, @Param(value = "userType") int userType, @Param(value = "userIdSet") Set<Long> userIdSet);

    void genMonthBillNoUser(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId, @Param(value = "userType") int userType
            , @Param(value = "payTypes") List<Integer> payTypeList, @Param(value = "userIdSet") Set<Long> userIdSet);

    // 企业生成账单
    void genCompanyBill(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId, @Param(value = "userType") int userType
            , @Param(value = "payTypes") List<Integer> payTypeList, @Param(value = "status") int status);

    // 账单计数
    int countByConditions(Map<String, Object> paramsMap);

    // 账单列表
    List<CBillAdminVo> selectByConditions(Map<String, Object> paramsMap);

    // 商户账单分享 数据查询
    List<KyleCompanyBill> selectkyleBillByBillId(@Param(value = "billIds") List<Long> billIds);

}